import java.util.Random;
import java.util.Scanner;
public class Price {
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		Random rand=new Random();
		int num,a=0,sum=0;
		a=rand.nextInt(100);
		System.out.println(a);
		boolean flag = true;
		while(flag){
			System.out.println("please input a number:");
			num=in.nextInt();		
			System.out.print(num);
			sum++;
			if(a==num){
				flag=false;
				System.out.println("correct");
				System.out.println("the time:"+sum);
				break;
				}
			else if(a<num){
				System.out.println("high");
			}
			else if(a>num){
				System.out.println("low");
			}
			if(sum==10){
				System.out.println("the answer:"+a);
				break;
			}
			}
		}
		}

	


